<style>

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}  

/* Layout */
.layout {
    display: flex;
    max-width: 1060px;
    margin: 0 auto;
    padding: 60px 20px;
	min-height: calc(100vh - 230px);
}

/* Sidebar */
.sidebar {
    padding-right: 20px;
    border-right: 1px solid #eee;
}

/* mobile sidebar toggle */
.sidebarToggle {
	
	position: fixed;
    bottom: -1px;
    left: -1px;
    z-index: 10000;

    background: rgba(20, 20, 20, 1);
    color: white;
    padding: 10px 14px;
    border-top-right-radius: 4px; 
    cursor: pointer;
	
	display: none;
}

.sidebar h4{
  margin-bottom: 20px;
}

#tagFilters {
    border-top: 1px solid rgba(255, 255, 255, 0.9);
    padding-top: 20px;
    margin-top: 16px;
}

.tag-pill {
    display: inline-block;
    padding: 6px 12px;
    margin: 8px 8px 0 0;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.8);
    cursor: pointer;
    user-select: none;
    transition: 0.2s ease;
	color: white;
}

.tag-pill:hover {
    border-color: white;
}

.tag-pill.active {
    background: white;
    color: black;
    border-color: white;
}

.reset-tags-btn {
	margin-bottom: 10px;
    cursor: pointer;
	border-radius: 4px;
	border-color: white;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Content */
.content {
    flex: 1;
    max-width: 700px;
    margin-left: 40px;
}

/* Post */
.post {
    margin-bottom: 30px;
    cursor: pointer;
	background-color: rgba(20, 20, 20, 0.3);
	border-radius: 4px 0 4px 4px;
	padding: 30px;
	
	position: relative;
	overflow: visible; /* important so tab can stick out */
	
	transition: all 0.25s ease;
}

.active, .post:hover {
	box-shadow: 0 0 0 1px white;
}

.post-body {
    display: block;
}

/* Header */
.post-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
	background-color: rgba(52, 48, 59, 1);
	border-radius: 4px 0 0 0;
	border-bottom: 1px solid rgba(255,255,255,0.05);
	margin: -30px -30px 1em -30px; /* Cancels out the post container padding */
    padding: 20px 30px;
	color: rgb(220, 220, 220)
}

.post-title {
    font-size: 1.4em;
    margin: 0;
}

.post-date {
    font-size: 0.9em;
    white-space: nowrap;
	padding-left: 50px;
}

/* Body */
.post-content {
	display: none;
}

.post-content p {
	max-width: inherit;
	color: white;
	margin-top: 0px;
}

.post-snippet,
.post-content {
    overflow-wrap: break-word;
}

/* Images */
.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 4px;
}

/* OPEN STATE */
.post.open .post-snippet {
    display: none;
}

.post.open .post-content {
    display: block;
}

/* Menu tab */
.post-tab {
	position: absolute;
	top: 0px;
	right: -30px; /* pushes it outside the container */

	width: 30px;

	background-color: rgba(52, 48, 59, 1);
	color: white;

	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;

	border-radius: 0 4px 4px 0; /* rounded on right side */

	transition: all 0.25s ease;
}

.post:hover .post-tab {
	background: white;
	color: rgba(52, 48, 59, 0.8);
	box-shadow:
		1px 0 0 white,   /* right */
		0 -1px 0 white,  /* top */
		0 1px 0 white;   /* bottom */
}

.tab-isolate, .tab-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin: 5px;
}

/* Search bar */
mark {
    background: #ffec99;
    border-radius: 2px;
}

.search-wrapper {
    border-top: 1px solid rgba(255, 255, 255, 0.9);
    margin-top: 16px;
    padding-top: 20px;
}

#searchInput {
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none;
    outline: none;
    border: 1px solid #fff;
    border-radius: 4px;
	margin-bottom: 10px;
}

#searchInput:focus {
    border-color: #111;
}

/* Calendar */
#calendar {
    margin-top: 30px;
    font-size: 14px;
}

/* Header (dropdown container) */
.calendar-header {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

/* Dropdowns */
.calendar-header select {
    flex: 1;
    padding: 6px 8px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #111;
    cursor: pointer;

    /* Remove default ugly styles (subtle improvement) */
    appearance: none;
}

/* Optional: subtle hover/focus polish */
.calendar-header select:hover {
    border-color: #aaa;
}

.calendar-header select:focus {
    outline: none;
    border-color: #111;
}

/* Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

/* Day labels + dates */
.calendar-day,
.calendar-date {
    text-align: center;
    padding: 6px;
}

/* Day labels */
.calendar-day {
    font-weight: bold;
    color: #888;
}

/* Dates */
.calendar-date {
    cursor: pointer;
    border-radius: 4px;
}

/* Hover */
.calendar-date:hover {
    background: #eee;
}

/* Today */
.calendar-today {
    background: #202020;
    color: #fff;
}

/* Has post */
.calendar-has-post {
    background: #ffd8a8;
	color: rgba(48, 0, 15, 1);
}

/* Selected */
.calendar-selected {
    outline: 2px solid #111;
}

/* tablets and phones */
@media (max-width: 1024px) {

    /* Stack layout */
    .layout {
        flex-direction: column;
        padding: 15px 15px;
    }

    /* Content centered */
    .content {
        margin-left: 0;
        max-width: 700px;
        width: 100%;
        margin-inline: auto;
		padding-right: 30px;
    }
	
	.post-content img {
		width: calc(100% + 60px);
		max-width: calc(100% + 60px);
		margin-left: -30px;
		margin-right: -30px;
	}
	
	.post-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .post-date {
        padding-left: 0;
        white-space: normal;
        font-size: 0.8em;
        opacity: 0.8;
    }

    .post-title {
        font-size: 1.2em;
    }

    /* SIDEBAR → OFF-CANVAS */
    .sidebar {
        position: fixed;
        top: 0;
        left: -300px; /* hidden off-screen */
        width: 260px;
		height: 100vh;
        height: 100dvh;

        background: rgba(20,20,20,1);
        padding: 20px;

        border-right: none;
        z-index: 9999;

        overflow: auto;
		scrollbar-width: none; /* Firefox */
        transition: left 0.3s ease;
    }
	
	.sidebar::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
	}

    /* When active */
    .sidebar.open {
        left: 0;
    }
	
	/* When sidebar is open, move button away */
	body.sidebar-open .sidebarToggle {
	  transform: translateX(-120%); /* pushes it off-screen */
	  opacity: 0;
	  pointer-events: none;
	}
	
	#noResults {
		color: white;
	}

    /* Toggle button */
    .sidebarToggle {
        display: block;
		transition: all 0.5s ease;
    }
	
	.scroll-arrow {
		display: none;
	}
	
	.no-scroll {
    overflow: hidden;
	}
}

</style>